class Person{
    public String name;
    public int age;
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
        fun();
    }

    public void fun(){
        System.out.println("父类的fun()方法");
    }
}
class Student extends Person{
    public Student(String name, int age) {
        super(name, age);
    }
    public void fun(){
        System.out.println("子类的fun()方法");
    }
}
public class Test {
    public static void main(String[] args) {
        Student student=new Student("张三",20);

    }
}
